package com.pt.restaurant_backend_management.pojo.dto;

import com.pt.restaurant_backend_management.pojo.po.Dish;
import com.pt.restaurant_backend_management.pojo.po.DishFlavor;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
 * DTO
 */
@JsonIgnoreProperties(ignoreUnknown = true) //  忽略JSON中的冗余字段
@Data
public class DishDto extends Dish {

    // 菜品对应的口味数据
    private List<DishFlavor> flavors = new ArrayList<>();

    @TableField(exist = false) //  标记非数据库字段
    private String categoryName;

    @TableField(exist = false)
    private Integer copies;
}
